package com.smh.demo1.a20;

import org.springframework.beans.SimpleTypeConverter;

import java.util.Date;

/**
 * @author shiminghui
 * @date 2025/5/1 14:54
 * @description: TODO
 */
public class TestSimpleConverter {
    public static void main(String[] args) {

        // 仅进行类型的转化
        SimpleTypeConverter typeConverter = new SimpleTypeConverter();
        Integer i = typeConverter.convertIfNecessary("123", int.class);
        Date date = typeConverter.convertIfNecessary("2004/10/26", Date.class);

        System.out.println(i);
        System.out.println(date);
    }
}
